package com.itheima.test0909.test04;

public class DiGui {
    public static void main(String[] args) {
        int sum = getJieCheng(5);
        System.out.println("jiecheng为"+ sum);
    }

    private static int getJieCheng(int i) {
        if (i == 1)
            return 1;
        else {
            return i * getJieCheng(i-1);
        }
    }
}
